	<!-- 交易退款界面  扫码退款 刷卡退款 -->
	<template>
		<view>
			<u-navbar title="退款记录" class="nav" :placeholder="true"
				:fixed="true"
				:safeAreaInsetTop="true">
				<view slot="left">
					<u-icon name="arrow-left" size="12" @click="onClickBack"></u-icon>
				</view>
				
			</u-navbar>
			
			<scroll-view scroll-x class="bg-white nav text-center">
				<view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in type" :key="index"
					@tap="tabSelect" :data-id="index">
					{{item.name}}
				</view>
			</scroll-view>
			
			<view class="bg-white">
				<text style="margin-left:30upx; font-size: 30upx; color: #939293;">{{date}}</text>
			</view>
	
			<view class="center c_text" style="height: 50upx; margin-top: 20upx;">
				<text style="margin-left: 150upx;">0</text>
				<text style="margin-left: 320upx;">0.00</text>
				</view>
				<view class="center " style="height: 90upx; font-size: 25upx;">
				<text style="margin-left: 120upx;">交易笔数</text>
				<text style="margin-left: 250upx; ">交易金额</text>
			</view>
			
			
			<view class="bg-white">
				<u-empty mode="order" icon="http://cdn.uviewui.com/uview/empty/order.png" text="暂无数据"></u-empty>
			</view>
			
		</view>
	</template>
	
	<script>
		export default {
			data() {
				const currentDate = this.getDate({
					format: true
				});
				return {
					TabCur: 0,
					date: currentDate,
					scrollLeft: 0,
					type: [{
							name: "扫码退款"
						},
						{
							name: "刷卡退款"
						}
					]
				}
			},
			methods: {
				onClickBack() {
					uni.navigateBack()
				},
				gotoorder() {
					uni.switchTab({
						url: "/pages/order/order"
					})
				},
				tabSelect(e) {
					console.log("1111")
					this.TabCur = e.currentTarget.dataset.id;
					console.log(this.TabCur)
					this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
				},
				getDate(type) {
					const date = new Date();
					let year = date.getFullYear();
					let month = date.getMonth() + 1;
					let day = date.getDate();
					
					if (type === 'start') {
						year = year - 60;
					} else if (type === 'end') {
						year = year + 2;
					}
					month = month > 9 ? month : '0' + month;
					day = day > 9 ? day : '0' + day;
					return `${year}-${month}-${day}`;
				},
			},
			
		}
	</script>
	
	<style>
		.biaoti_level {
			/* float: left; */
			flex: content;
		}
	
		.biaoti_style {
			/* margin-right: 100upx; */
			/* margin-left: 50upx; */
			/* letter-spacing: 10upx; */
			/* margin-top: 20upx; */
			font-size: 40upx;
		}
		.center {
		    margin: auto;
		    width: 100%;
		  /*  border: 3px solid green; */
		    padding: 10px;
			background-color:#f0f0f0 
		}
		.c_text{
			font-weight: 600;
			font-size: 30upx;
		}
	</style>
	